<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    大于：<input id="myTest2" type="text" value="5&gt;6" ></input><br>
    <script>
      let allMap = new Map([
        ['重命名报告', true],
        ['删除报告页', true],
        ['新增续页', true],
        ['新增通用页', true],
        ['新增通用续页', true],
        ['新增PDF页', true],
        ['新增部件', true],
        ['插入同级通用页', true],
        ['插入同级部件', true],
        ['插入同级PDF页', true],
        ['分发历史', true],
        ['送审', true],
        ['退回', true],
        ['完结', true]
      ])

      let needSetMap = new Map([
        ['重命名报告', false],
        ['删除报告页', false],
        ['新增续页', false]
      ])

      function setMapAll(allMap, bolean) {
        for (var [key, value] of allMap) {
          allMap.set(key, bolean)
        }
      }

      function setSomeMap(allMap, needSetMap) {
        for (const [key, value] of needSetMap) {
          allMap.set(key, value)
        }
      }

      function getTrueMap(allMap) {
        for (const [key, value] of allMap) {
          if (!allMap.get(key)) allMap.delete(key)
        }
      }

      setSomeMap(allMap, needSetMap)
      console.log(`allMap`, allMap)

      getTrueMap(allMap)
      console.log(allMap);
    </script>
  </body>
</html>
